package view;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class ImageFrame extends JPanel {

	/**
	 * Initializes a JFrame instance that displays an graphic image centered on
	 * the JPanel.
	 * @param imageFileName
	 * the absolute path to the image file or the relative path from
	 * the execution directory. The image file must be of a format
	 * compatible with <code>javax.swing.ImageIcon</code>.
	 */
	public ImageFrame(String imageFileName) {
		
		ImageIcon icon = new ImageIcon(imageFileName);
		JLabel label = new JLabel(icon);
		this.add(label);// adds to center region of default BorderLayout of pane
	}
}